#ifndef __CV2_H__  
#define __CV2_H__ 

#include <opencv2/opencv.hpp>  
#include "opencv2/highgui/highgui.hpp"  
#include "opencv2/imgproc/imgproc.hpp"  
#include "opencv2/core/core.hpp"  
#include "Bmp.h"

using namespace cv;
using namespace std;

struct HoughNode {
	int count;
	int head_x;
	int head_y;
	int tail_x;
	int tail_y;
};

class CV2
{
public:
	static Mat imreadBMP(const char* path);

	static void imwriteBMP(const char* path, Mat image);

	static void showBmpFileHead(BITMAPFILEHEADER BmpFileHead);;

	static void showBmpInfoHead(BITMAPINFOHEADER BmpInfoHead);

	static Mat cvtBGR2GRAY(Mat image);

	static Mat gaussianBlur(Mat image, int kernel_size, double gigma);

	static Mat conv2D(Mat image, Mat Kernel, int padding_size, int stride);

	static Mat padding(Mat image, int padding_size);

	static Mat canny(Mat image, double threshold1, double threshold2);

	static Mat cvt64FTo8U(Mat image);

	static Mat poly(Size size, vector<pair<int, int>> shape_loc);

	static void line(Mat& image, vector<pair<int, int>> line_points);

	static void polyFilling(Mat& image, int seed_x, int seed_y);

	static Mat pixelAnd(Mat image, Mat mask);

	static vector<vector<pair<int, int>>> houghLines(Mat image, int min_thres, int max_dis);

	static Mat erode(Mat image, int kernel_size = 3);

	static Mat dilate(Mat image, int kernel_size = 3);

	static Mat sub(Mat image1, Mat image2);

	static Mat div(Mat image, unsigned int num);

	static Mat addAvage(Mat image1, Mat image2);

	static Mat cannyCompare(Mat canny1, Mat canny2);

	static Mat getLight(Mat image1, Mat image2);

	static Mat diffFilter(Mat canny_compare);

	//static void FindLightAffectedArea(Mat& canny_compare);

};
#endif


